package com.bosssoft.hr.train.j2se.exception;


/**
 * BusinessException
 *
 * @author 史旭升
 * @date 2022-12-11 14:58
 */
public class BusinessException extends RuntimeException {
    /**
     * 错误码
     */
    private final int code;

    /**
     * 通过枚举构建异常对象
     * @param myException 枚举对象
     */
    public BusinessException(MyException myException){
        super(myException.getMsg());
        this.code = myException.getCode();
    }


}
